allowPackage

@NonNull
open fun allowPackage(@NonNull packageName: @NonNull String): @NonNull IntentSanitizer.Builder(source)

Add a package to the allowed packages. This does not imply the intent can contain a component from the allowed package; instead, this value will be compared against the result returned from the Intent's getPackage method. This method can be called multiple times and the result is additive. They will not overwrite each other.

Return

this builder.


@NonNull
open fun allowPackage(@NonNull filter: @NonNull Predicate<String>): @NonNull IntentSanitizer.Builder(source)

Add a filter for allowed packages. This does not imply the intent can contain a component from the allowed package; instead, this value will be compared against the result returned from the Intent's getPackage method. This method can be called multiple times and the result is additive. They will not overwrite each other.

Return

this builder.

Parameters

filter

the package name filter.